package com.kk.springboot_001.config;

import com.kk.test.connectionpool.ConnectionPoolImpl;
import com.kk.test.connectionpool.DataSourceConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

@Configuration
public class MyDataSourceConfig {

    @Bean
    public DataSource myConnectionPool(DataSourceConfig config) {

        ConnectionPoolImpl pool = new ConnectionPoolImpl(config);
        return pool;
    }
}